Skip to content

Conversation

@mazunki
Copy link
Contributor

@mazunki mazunki commented Oct 19, 2025

Continuation of #2320 , but addressing tests.

@alfreb test/kernel/integration/paging/service.cpp has an unused heap_code variable. I see you updated this test in 2019.

The void(*heap_code)() = (void(*)()) malloc(42); line is at the very beginning of the test. I suspect the intention of this is to warm of the allocator. Did you mean to change this to magic->heap_code?

I don't want to touch the tests based on assumptions on what the intention was, without fully understanding what the idea behind it was.

Additionally, Expects(magic->last_error = Page_fault); is surely a subtle bug? That = should be ==, right?

@mazunki mazunki marked this pull request as draft October 19, 2025 16:23
@mazunki mazunki force-pushed the fix-silence-unused-parameters2 branch 2 times, most recently from fc77144 to 4abfe60 Compare October 28, 2025 23:43
same value is used explicitly in test later
removed redundant variables or marked them unused if they're based on
preprocessor conditions
by converting names to `std::string` and `std::string_view` we
facilitate comparing strings
while this can be done explicitly if we know if our ip type is ip4 or
ip6, this allows us to pass `auto ip` to the comparison
@mazunki mazunki force-pushed the fix-silence-unused-parameters2 branch from 4abfe60 to 39a2a7d Compare November 2, 2025 00:24
@mazunki mazunki marked this pull request as ready for review November 2, 2025 00:25
@mazunki
Copy link
Contributor Author

mazunki commented Nov 2, 2025

This has been rebased and is ready for review. As the title mentions, these tests are related to tests; but touches upon some source too.

There are still a few warnings I'd like to address, but they're more related to issues with the source itself, so I will handle them at a later point

these variables were previously unused
this should probably not use external DNS servers at all, but this
variable is unused which is reported as a warning. this issue is already
tracked in includeos#2313
@mazunki mazunki force-pushed the fix-silence-unused-parameters2 branch from 33410e9 to d84bda7 Compare November 2, 2025 19:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant